# -*- coding: utf-8 -*-
import MySQLdb as mdb
class MYSQL:
    def __init__(self, sql):
        conn = mdb.connect(host="localhost", user="root", passwd="root", db="test")
        cursor = conn.cursor()
        cursor.execute(sql)
        self.alldata = cursor.fetchall()
        cursor.close()
        conn.close()

    def getRs(self):
        return self.data
        
if __name__ == "__main__":
    sql = 'INSERT INTO content, addtime VALUES ("2343423", 1343979069)'

    MYSQL(sql)
